package com.Khan.SocialRescueSys.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Pattern;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author Khan Liu
 * @date 2022/3/28 10:55
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Force {

    private Long id;
    private String title;
    private String content;
    private String firstPicture;
    @Pattern(regexp = "^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$\n")
    private String email;
    @Pattern(regexp = "/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$/\n")
    private String tel;
    private Integer views;
    private boolean commentable;
    private boolean published;
    private Date createTime;
    private Date updateTime;
    private String addr;

    /**这个属性用来在mybatis中进行连接查询的*/
    private Long typeId;
    private Long userId;
    private Long provinceId;

    private Type type;
    private Province province;

    private User user;

    private List<Comment> comments = new ArrayList<>();
}
